package com.mtons.mblog.modules.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

/**
 * @author : langhsu
 */
@TableName("mto_tag")
public class Tag {
    @TableId(type = IdType.AUTO)
    private long id;

    /**
     * 标签名称
     */
    private String name;

    /**
     * 预览图
     */
    private String thumbnail;

    /**
     * 描述
     */
    private String description;

    /**
     * 最后发表的文章Id
     */
    private long latestPostId;

    @TableField(value = "created", fill = FieldFill.INSERT)
    private Date created;

    @TableField(value = "created", fill = FieldFill.UPDATE)
    private Date updated;

    /**
     * 标签下的文章数
     */
    private int posts;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public long getLatestPostId() {
        return latestPostId;
    }

    public void setLatestPostId(long latestPostId) {
        this.latestPostId = latestPostId;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public int getPosts() {
        return posts;
    }

    public void setPosts(int posts) {
        this.posts = posts;
    }
}
